import logging
from rest_framework.response import Response
from rest_framework.views import APIView

from django.shortcuts import render
# Create your views here.
# 得到日志输出对象logger
logger = logging.getLogger('erp')

class Hello(APIView):
    """测试视图，以及logging日志"""
    def get(self, request):
        logger.debug('debug级别的日志')
        logger.info('info级别的日志')
        logger.error('error级别的日志')
        return Response({'message': 'test is ok'})
